<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title>新建网页</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="description" content="" />
        <meta name="keywords" content="" />

		<script src="../jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
        function f1(){
            //fadeTo(speed, opacity 透多0-1透少, [callback])
            //$('#two').fadeTo(0, 0.3);
           $('#two').fadeTo(3000, 0.4, function() {
            	alert("fageTo over");
            });
        }
        </script>
        <style type="text/css">
        #one {width:300px; height:200px; background-color:blue; 
            font-size:35px; font-weight:bold;
            position:absolute; left:40px; top:40px;
        }
        #two {width:300px; height:200px; background-color:green; 
            font-size:35px; font-weight:bold;
             position:absolute; left:60px; top:60px;
        }
        </style>
    </head>
    <body>
        <h2>设置指定的透明度</h2>

        <div id="one">this is one div</div>
        <div id="two">this is two div</div>
		
        <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
        <input type="button" value="设置" onclick="f1()" />
    </body>
</html>